#ifndef OLED_h
#define OLED_h

#include "stm32f10x.h"

#define	OLED_CS_CLK		RCC_APB2Periph_GPIOB
#define	OLED_CS_PORT	GPIOB
#define	OLED_CS_PIN		GPIO_Pin_12

#define	OLED_DC_CLK		RCC_APB2Periph_GPIOB
#define	OLED_DC_PORT	GPIOB
#define	OLED_DC_PIN		GPIO_Pin_14

#define	OLED_CS_L		GPIO_ResetBits(OLED_CS_PORT,OLED_CS_PIN)
#define	OLED_CS_H		GPIO_SetBits(OLED_CS_PORT,OLED_CS_PIN)

#define	OLED_DC_L		GPIO_ResetBits(OLED_DC_PORT,OLED_DC_PIN)
#define	OLED_DC_H		GPIO_SetBits(OLED_DC_PORT,OLED_DC_PIN)


void OLED_PIN_INit(void);
void OLED_Write_Com(u8 cmmon);
void OLED_Write_Data(u8 Data);
void OLED_INit(void);
void OLED_Draw_Point(unsigned char x, unsigned char y);
void OLED_Clear(u8 x0,u8 y0,u8 x1,u8 y1);
void OLED_Ascill_8X16(int Xpos,int Ypos,char Str);
void OLED_ZFC_8X16(u8 Xpos,u8 Ypos,char *Str);
void OLED_HZ_16X16(int Xpos,int Ypos,const char *Font,u8 Num);
void OLED_HZ_16X16_W25Q16(int Xpos,int Ypos,const char *Font);
void OLED_Display( int Xpos,int Ypos,u8 *Font);

#endif
